﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserLogin.aspx.cs" Inherits="UserPower_UserLogin" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title><%=Resources.Resource.UserLoginTitle%><%--大陆电子用户登录界面--%></title>
    <script type="text/javascript">
        function changelanguage(ivalue) {
            document.getElementById("selectlanguage").value = ivalue;
            document.forms[0].submit();
        }
    </script>
</head>
<body background="../Themes/Images/Loginbackground/Loginbackground.jpg">
    <form id="form1" runat="server">
    <div>
        <table>
            <tr>
                <td colspan="3" style="height: 180px; vertical-align: top">
                    <div style="width: 10%; float: right">
                    <input id="selectlanguage" name="selectlanguage" type="hidden" />
                        <a href="#" onclick="changelanguage('2')">English</a>
                        &nbsp;&nbsp;
                        <a href="#" onclick="changelanguage('1')">中文</a>
                    </div>
                </td>
            </tr>
            <tr>
                <td style="width: 40%; height: 207px;">
                </td>
                <td style="height: 207px;">
                    <table cellpadding="0" cellspacing="0" style="border-width: 0px; width: 311px; height: 214px;
                        background-image: url('../Themes/Images/Loginbackground/logintable1.jpg');">
                        <tr>
                            <td style="height: 78px; vertical-align: bottom">
                                <div style="width: 100%; height: 25%; text-align: center;">
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 30px">
                                <div style="float: left; width: 100%; height: 30px; text-align: center">
                                    <%=Resources.Resource.LoginUserName%>:<asp:TextBox ID="txtUserName" runat="server"
                                        Width="120px" AutoCompleteType="Disabled"></asp:TextBox>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 21px;">
                                <div style="float: left; width: 100%; height: 30px; text-align: center;">
                                    <%=Resources.Resource.LoginUserPassWord%>:<asp:TextBox ID="txtPassword" runat="server"
                                        TextMode="Password" Width="120px"></asp:TextBox>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 49px;">
                                <div style="text-align: center; width: 100%; height: 42px;">
                                    <asp:CheckBox ID="CheckBoxRemberme" runat="server" Text="<%$Resources:Resource,LoginRememberMe%>" />
                                    &nbsp;<asp:Button ID="btn_Login" runat="server" Text="<%$Resources:Resource,Login%>"
                                        OnClick="btn_Login_Click" OnClientClick="return IsEmpty()" />
                                    &nbsp;<asp:Button ID="Buttonreset" runat="server" Text="<%$Resources:Resource,Reset%>"
                                        OnClick="Buttonreset_Click" />
                                    &nbsp;
                                </div>
                            </td>
                        </tr>
                    </table>
                </td>
                <td style="width: 40%; height: 207px;">
                </td>
            </tr>
            <tr>
                <td colspan="3">
                </td>
            </tr>
        </table>
    </div>
    <script type="text/javascript">
        function IsEmpty() {
            var username = document.getElementById('<%=txtUserName.ClientID %>');
            var pass = this.document.getElementById("<%=txtPassword.ClientID %>");
            var check = this.document.getElementById("<%=CheckBoxRemberme.ClientID %>");
            if (username.value == "" || pass.value == "") {
                check.checked = false;
                username.focus();
                alert('<%= Resources.Resource.UserLoginMag1 %>')//用户名及密码均不能为空！
                return false;
            }
            else {
                return true;
            }

        }
        function LoginFalse() {
            var username = document.getElementById('<%=txtUserName.ClientID %>');
            var pass = this.document.getElementById("<%=txtPassword.ClientID %>");
            var check = this.document.getElementById("<%=CheckBoxRemberme.ClientID %>");
            username.value = "";
            pass.value = "";
            check.checked = false; ;
            username.focus();
            alert('<%= Resources.Resource.UserLoginMag2 %>'); //用户登录失败，请重新登录！
        }
    </script>
    </form>
</body>
</html>
